<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>访问被拒绝 - 宠物医院管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        .unauthorized-container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            padding: 50px;
            text-align: center;
            max-width: 600px;
            backdrop-filter: blur(10px);
        }
        .unauthorized-icon {
            font-size: 5rem;
            color: #ffc107;
            margin-bottom: 30px;
        }
        .unauthorized-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: #333;
            margin-bottom: 20px;
        }
        .unauthorized-message {
            font-size: 1.2rem;
            color: #666;
            margin-bottom: 30px;
            line-height: 1.6;
        }
        .btn-home {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 10px;
            padding: 12px 30px;
            font-weight: 600;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            margin: 0 10px;
        }
        .btn-home:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        .btn-back {
            background: transparent;
            border: 2px solid #667eea;
            border-radius: 10px;
            padding: 10px 30px;
            font-weight: 600;
            color: #667eea;
            text-decoration: none;
            transition: all 0.3s ease;
            margin: 0 10px;
        }
        .btn-back:hover {
            background: #667eea;
            color: white;
        }
        .error-code {
            font-size: 1rem;
            color: #999;
            margin-bottom: 10px;
        }
        .permission-info {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            color: #856404;
        }
        .permission-info i {
            color: #ffc107;
            margin-right: 10px;
        }
    </style>
</head>
<body>
    <div class="unauthorized-container">
        <div class="unauthorized-icon">
            <i class="fas fa-shield-alt"></i>
        </div>
        
        <div class="error-code">
            错误代码: 403
        </div>
        
        <h1 class="unauthorized-title">访问被拒绝</h1>
        
        <p class="unauthorized-message">
            抱歉，您没有权限访问此页面。
            <br>请确认您的账户权限或联系系统管理员。
        </p>
        
        <div class="permission-info">
            <i class="fas fa-info-circle"></i>
            <strong>权限说明：</strong>
            <br>此页面需要特定的用户权限才能访问。如果您认为这是一个错误，请联系系统管理员为您分配相应的权限。
        </div>
        
        <div class="unauthorized-actions">
            <a href="javascript:history.back()" class="btn-back">
                <i class="fas fa-arrow-left me-2"></i>返回上页
            </a>
            <a href="${pageContext.request.contextPath}/" class="btn-home">
                <i class="fas fa-home me-2"></i>返回首页
            </a>
        </div>
        
        <div class="mt-4">
            <small class="text-muted">
                需要帮助？请联系系统管理员：
                <a href="mailto:admin@pethospital.com" style="color: #667eea;">admin@pethospital.com</a>
            </small>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 记录访问被拒绝的信息
        console.warn('访问被拒绝:', {
            url: window.location.href,
            referrer: document.referrer,
            timestamp: new Date().toISOString(),
            userAgent: navigator.userAgent
        });
        
        // 3秒后自动返回上一页（可选）
        // setTimeout(function() {
        //     history.back();
        // }, 3000);
    </script>
</body>
</html>
